$(function() {
	        		var $container = $('#container');
	        		$container.imagesLoaded(function() {
	        			$container.masonry({
	        				itemSelector : '.box',
	        				columnWidth : 100
	        			});
	        		});
	        		$container.infinitescroll({
					itemSelector : '.box', // selector for all items you'll retrieve
				},
				// trigger Masonry as a callback
					function(newElements) {
						// hide new items while they are loading
						var $newElems = $(newElements).css({
							opacity : 0
						});
					});
	        	});